import { useLocation, useNavigate } from "react-router-dom";

export default () => {
	const location = useLocation();
	const navigate = useNavigate();

	const query = new URLSearchParams(location.search);

	return {
		...location,
		navigate,
		query
	};
};
